﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BookReader
{
    class rmCommand:ICommand
    {
        #region ICommand 成员

        void ICommand.Execute(string[] param)
        {
            Config.BookMarkerRow row = StaticData.config.BookMarker.FindByFileName(StaticData.openFilepath);
            if (row == null)
            {
                Console.WriteLine("本书没有书签");
                return;
            }
            ICommand subCmd = new gtCommand();
            subCmd.Execute(new string[] { row.PageIndex.ToString() });
        }

        string ICommand.Help()
        {
            return "rm命令：读书签命令";
        }

        #endregion
    }
}
